package org.linlinjava.litemall.db.dao;

import org.apache.ibatis.annotations.Param;
import org.linlinjava.litemall.db.domain.LitemallUser;
import org.linlinjava.litemall.db.domain.UserNode;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

public interface UserMapper {
    int updateWithOptimisticLocker(@Param("lastUpdateTime") LocalDateTime lastUpdateTime, @Param("record") LitemallUser user);

    List<UserNode> queryTeam(@Param("id") Integer id);

    /**
     * 计算所有用户总消费
     * @return
     */
    BigDecimal sumCostMoney();
}